package edu.neusoft.yuejian_09.service;

import java.util.List;

import edu.neusoft.yuejian_09.bean.Activities;
import edu.neusoft.yuejian_09.bean.ActivityOrder;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

/**
 * Created by 爽 on 2017/9/27.
 */

public interface ActivityService {
    //获取所有活动列表
    @GET("Activity/getActivity")
    Call<List<Activities>> getAllActivities();

    //获取活动详情
    @GET("Activity/activityInfo")
    Call<Activities> getActivityById(
            @Query("activity_id") int acitivity_id
    );

    //搜索活动
    @GET("Activity/searchActivity")
    Call<List<Activities>> getActBySearch(
            @Query("search") String search
    );
    //报名活动
    @GET("Activity/addactivityn")
    Call<ActivityOrder> insertOrder(
            @Query("user_id") int user_id,
            @Query("activity_id") int activity_id
    );
}
